package org.distributed.transaction.core.annotion;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.distributed.transaction.core.enums.Propagation;

/**
 * tcc分布式事务注解
 * 
 * @author chenfanglin
 *
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface TccTransaction {

	/**
	 * 确认执行业务方法
	 */
	public String confirm() default "";

	/**
	 * 取消执行业务方法
	 */
	public String cancel() default "";

	/**
	 * 事务传播机制，默认REQUIRED
	 */
	Propagation propagation() default Propagation.REQUIRED;
}
